home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
enigma
/
earcd
/
sviluppo
/
svilupp2
/
muiclstr.lha
/
txt
/
MuiOSimple.def
< prev
next >
Wrap
Text File
|
1995-12-19
|
31KB
|
810 lines
|##########|
|#MAGIC #|DNEIEIEN
|#PROJECT #|"Mui"
|#PATHS #|"StdProject"
|#FLAGS #|xx---x-xxx--x-x-----------------
|#USERSW #|--------------------------------
|#USERMASK#|--------------------------------
|#SWITCHES#|x----xxxxx-xx---
|##########|
DEFINITION MODULE MuiOSimple;
(*------------------------------------------
:Module. MuiOSimple.mod
:Author. Henning Thielemann
:Address. Veilchenweg 34, 06118 Halle, Germany
:EMail. henning.thielemann@student.uni-halle.de
:Version. $VER: MuiOSimple.mod 8.0 (01.06.95)
:Copyright. Henning Thielemann
:Language. Cluster
:Translator. Amiga Cluster V2.0
:Contents. Contains the object creation on a simple manner
:Bugs.
:Usage.
:History. .2 [ht] 01-Jun-1995 : Translated to Cluster
:History. .1 [awn] 02-Jul-1994 : Created in Oberon by Albert Weinert
--------------------------------------------*)
IMPORT Exec AS e,
Intuition AS I,
Utility AS u,
SYSTEM AS y;
FROM System IMPORT Regs, SysStringPtr;
FROM Resources IMPORT New;
FROM MuiO AS m IMPORT All;
CONST ArrayAdd = 24;
TYPE
TagArray = POINTER TO ARRAY OF u.TagItem;
Class = POINTER TO ClassDesc;
Args = POINTER TO ArgsDesc;
Hook = POINTER TO HookDesc;
StringArray = ARRAY OF SysStringPtr;
ClassDesc = RECORD OF e.Node
name : ARRAY [32] OF CHAR;
iclass : I.IClassPtr;
tags : TagArray;
tagnum : LONGINT;
tagdata : BOOLEAN;
END;
ArgsDesc = RECORD END;
PopupArgs = RECORD OF ArgsDesc
linkedObj : Object (* Das Objekt zu dem das Popup Object gelinkt ist *)
END;
HookDef = PROCEDURE ( hook : Hook; object : Object; args : Args ):LONGINT;
(* Hook-Example.
*
* TYPE PopWindowArgs = RECORD( d : MuiSimple.ArgsDesc );
* window : Object;
* END;
*
* VAR myHook : MuiSimple.Hook;
* button : Object;
* window : Object;
*
* PROCEDURE PopWindow( hook : Hook; object : Object; args : Args ) : LONGINT;
* BEGIN
* IF args # NIL THEN
* IF args(PopWindowArgs).window # NIL THEN
* m.DoMethod( args(PopWindowArgs).window, m.mWindowToFront );
* END;
* END;
* RETURN 0;
* END PopWindow;
*
* BEGIN
* [... create Application Windows ...]
*
* myHook := MuiSimple.MakeHook( PopWindow );
* IF myHook # NIL THEN
* m.DoMethod( button, m.mNotify, m.aPressed, e.false,
* button, 3, m.mCallHook, myHook, window );
* END;
* [... Do the other magic ...]
*
* Note: Typed on the fly, no warranty is given that this piece of code really work.
*)
HookDesc = RECORD OF e.MinNode
entry : PROCEDURE ( hook IN A0 : Hook;
object IN A2 : Object;
args IN A1 : Args ):LONGINT;
subEntry : HookDef;
a5 : ANYPTR;
object : Object;
END;
VAR no : e.List;
(* ---- MuiSimple Hook-Dispatcher ---- *)
$$PushRegs := TRUE;
$$StackChk := FALSE;
PROCEDURE HookEntry(hook IN A0 : Hook;
object IN A2 : Object;
args IN A1 : Args): LONGINT;
PROCEDURE MakeHook (entry: HookDef):Hook;
PROCEDURE SetHookObject (hook : Hook; object : Object);
PROCEDURE GetHookObject (hook : Hook) : Object;
(***************************************************************************
** Class Tree
****************************************************************************
**
** rootclass (BOOPSI's base class)
** +--Notify (implements notification mechanism)
** +--Family (handles multiple children)
** ! +--Menustrip (describes a complete menu strip)
** ! +--Menu (describes a single menu)
** ! \--Menuitem (describes a single menu item)
** +--Application (main class for all applications)
** +--Window (handles intuition window related topics)
** +--Area (base class for all GUI elements)
** +--Rectangle (creates (empty) rectangles)
** +--Image (creates images)
** +--Text (creates some text)
** +--String (creates a string gadget)
** +--Prop (creates a propoptional gadget)
** +--Gauge (creates a fule gauge)
** +--Scale (creates a percentaee scale)
** +--Boopsi (interface to BOOPSI gadgets)
** +--Colorfield (creates a field with changeable color)
** +--List (creates a line-oriented list)
** ! +--Floattext (special list with floating text)
** ! +--Volumelist (special list with volumes)
** ! +--Scrmodelist (special list with screen modes)
** ! \--Dirlist (special list with files)
** +--Group (groups other GUI elements)
** +--Registep (handles page groups with titles)
** +--Virtgroup (handles virtual groups)
** +--Scrollgroup (handles virtual groups with scrollers)
** +--Scrollbar (creates a scrollbar)
** +--Listview (creates a listview)
** +--Radio (creates radio buttons)
** +--Cycle (creates cycle gadgets)
** +--Slider (creates slider gadgets)
** +--Coloradjust (creates some RGB sliders)
** +--Palette (creates a complete palette gadget)
** +--Colorpanel (creates a panel of colors)
** +--Popstring (base class for popups)
** +--Popobject(popup a MUI object in a window)
** \--Popasl (popup an asl requester)
**
**************************************************************)
(**************************************************************************
**
** Object Generation
** -----------------
**
** The xxxObject (and xChilds) procedures generate new instances of MUI classes.
** Every xxxObject can be followed by tagitems specifying initial create
** time attributes for the new object and must be terminated with the
** End macro:
**
** StringObject;
** TagItem2( m.aStringContents, "foo",
** m.aStringMaxLen , 40 );
** obj := End();
**
** With the Child, SubWindow and WindowContents shortcuts you can
** construct a complete GUI within one command:
**
** ApplicationObject;
**
** ...
**
** SubWindow; WindowObject;
** WindowContents; VGroup;
** Child; String("foo",40);
** Child; String("bar",50);
** Child; HGroup;
** Child; CheckMark(TRUE);
** Child; CheckMark(FALSE);
** end;
** end;
** end;
**
** SubWindow; WindowObject;
** WindowContents; HGroup;
** Child; ...;
** Child; ...;
** end;
** end;
**
** ...
**
** app := End();
**
***************************************************************************)
PROCEDURE StoreObject (VAR store : ANYPTR; object : Object) : Object;
| store sollte Typ des Objects besitzen, ANYPTR nur der VAR-Allgemeinheit wegen
PROCEDURE MakeFamilyObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeFamilyObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeMenustripObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeMenustripObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeMenuObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeMenuObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeMenuObjectTA (name : SysStringPtr; tags : MuiTagAPtr) : Object;
PROCEDURE MakeMenuObjectT (name : SysStringPtr; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeMenuitemObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeMenuitemObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeWindowObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeWindowObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeImageObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeImageObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeBitmapObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeBitmapObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeBodychunkObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeBodychunkObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeNotifyObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeNotifyObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeApplicationObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeApplicationObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeTextObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeTextObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeRectangleObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeRectangleObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeListObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeListObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakePropObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakePropObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeStringObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeStringObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeScrollbarObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeScrollbarObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeListviewObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeListviewObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeRadioObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeRadioObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeVolumelistObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeVolumelistObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeFloattextObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeFloattextObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeDirlistObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeDirlistObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeSliderObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeSliderObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeCycleObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeCycleObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeGaugeObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeGaugeObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeScaleObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeScaleObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeBoopsiObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeBoopsiObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeColorfieldObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeColorfieldObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeColorpanelObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeColorpanelObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeColoradjustObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeColoradjustObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakePaletteObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakePaletteObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeGroupObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeGroupObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeRegisterObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeRegisterObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeVirtgroupObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeVirtgroupObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeScrollgroupObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeScrollgroupObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakePopstringObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakePopstringObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakePopobjectObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakePopobjectObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakePoplistObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakePoplistObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakePopaslObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakePopaslObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeScrmodelistObjectA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeScrmodelistObject (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeVGroupA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeVGroup (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeHGroupA (tags : MuiTagAPtr) : Object;
PROCEDURE MakeHGroup (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeColGroupA (cols : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeColGroup (cols : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeRowGroupA (rows : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeRowGroup (rows : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakePageGroupA (tags : MuiTagAPtr) : Object;
PROCEDURE MakePageGroup (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeVGroupAV (tags : MuiTagAPtr) : Object;
PROCEDURE MakeVGroupV (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeHGroupAV (tags : MuiTagAPtr) : Object;
PROCEDURE MakeHGroupV (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeColGroupAV (cols : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeColGroupV (cols : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeRowGroupAV (rows : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeRowGroupV (rows : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakePageGroupAV (tags : MuiTagAPtr) : Object;
PROCEDURE MakePageGroupV (tags : LIST OF MuiTags) : Object;
PROCEDURE MakeRegisterGroupA (REF titles : StringArray; tags : MuiTagAPtr) : Object;
PROCEDURE MakeRegisterGroup (REF titles : StringArray; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Frame Types
** -----------
**
** These procedures may be used to specify one of MUI's different frame types.
** Note that every procedure consists of one or more { ti_Tag, ti_Data }
** pairs.
**
** GroupFrameT() is a special kind of frame that contains a centered
** title text.
**
** HGroup; GroupFrameT("Horiz Groups");
** Child; RectangleObject; TextFrame ; end;
** Child; RectangleObject; StringFrame; end;
** Child; RectangleObject; ButtonFrame; end;
** Child; RectangleObject; ListFrame ; end;
** end;
**
***************************************************************************)
CONST
NoFrame = MuiTags : frame : none;
ButtonFrame = MuiTags : frame : button;
ImageButtonFrame = MuiTags : frame : imageButton;
TextFrame = MuiTags : frame : text;
StringFrame = MuiTags : frame : string;
ReadListFrame = MuiTags : frame : readList;
InputListFrame = MuiTags : frame : inputList;
PropFrame = MuiTags : frame : prop;
SliderFrame = MuiTags : frame : slider;
GaugeFrame = MuiTags : frame : gauge;
VirtualFrame = MuiTags : frame : virtual;
GroupFrame = MuiTags : frame : group;
GROUP
FrameGrp =
NoFrame, ButtonFrame, ImageButtonFrame, TextFrame,
StringFrame, ReadListFrame, InputListFrame, PropFrame,
SliderFrame, GaugeFrame, VirtualFrame, GroupFrame;
(***************************************************************************
**
** Baring Procedures
** ------------------
**
***************************************************************************)
PROCEDURE MakeHBar() : Object;
PROCEDURE MakeVBar() : Object;
(***************************************************************************
**
** Spacing Procedures
** ------------------
**
***************************************************************************)
PROCEDURE MakeHVSpace() : Object;
PROCEDURE MakeHSpace (x : LONGINT) : Object;
PROCEDURE MakeVSpace (x : LONGINT) : Object;
PROCEDURE MakeHCenterObject (obj : Object): Object;
PROCEDURE MakeVCenterObject (obj : Object): Object;
(***************************************************************************
**
** String-Object
** -------------
**
** The following procedure creates a simple string gadget.
**
***************************************************************************)
PROCEDURE MakeStringA (contents : SysStringPtr; maxlen : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeString (contents : SysStringPtr; maxlen : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyStringA (contents : SysStringPtr; maxlen : LONGINT; controlchar : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyString (contents : SysStringPtr; maxlen : LONGINT; controlchar : CHAR; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Integer-Object
** --------------
**
** The following procedure creates a simple integer string gadget.
**
***************************************************************************)
CONST
cardinalAccept = "0123456789";
integerAccept = "-0123456789";
PROCEDURE MakeIntegerA (contents : LONGINT; maxlen : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeInteger (contents : LONGINT; maxlen : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyIntegerA (contents : LONGINT; maxlen : LONGINT; controlchar : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyInteger (contents : LONGINT; maxlen : LONGINT; controlchar : CHAR; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** CheckMark-Object
** ----------------
**
** The following procedure creates a checkmark gadget.
**
***************************************************************************)
PROCEDURE MakeCheckMarkA (checked : CBOOLEAN; tags : MuiTagAPtr) : Object;
PROCEDURE MakeCheckMark (checked : CBOOLEAN; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyCheckMarkA (checked : CBOOLEAN; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyCheckMark (checked : CBOOLEAN; key : CHAR; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Button-Objects
** --------------
**
** Note: Use small letters for KeyButtons, e.g.
** KeyButton("Cancel",'c') and not KeyButton("Cancel",'C') !!
**
***************************************************************************)
PROCEDURE MakeSimpleButtonA (name : SysStringPtr; tags : MuiTagAPtr) : Object;
PROCEDURE MakeSimpleButton (name : SysStringPtr; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyButtonA (name : SysStringPtr; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyButton (name : SysStringPtr; key : CHAR; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeImageButtonA (image : StandardImages; freeVert, freeHoriz : CBOOLEAN := true; tags : MuiTagAPtr) : Object;
PROCEDURE MakeImageButton (image : StandardImages; freeVert, freeHoriz : CBOOLEAN := true; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Cycle-Object
** ------------
**
***************************************************************************)
PROCEDURE MakeCycleA (REF entries : StringArray; tags : MuiTagAPtr) : Object;
PROCEDURE MakeCycle (REF entries : StringArray; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyCycleA (REF entries : StringArray; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyCycle (REF entries : StringArray; key : CHAR; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Radio-Object
** ------------
**
***************************************************************************)
PROCEDURE MakeRadioA (name : SysStringPtr; REF entries : StringArray; tags : MuiTagAPtr) : Object;
PROCEDURE MakeRadio (name : SysStringPtr; REF entries : StringArray; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyRadioA (name : SysStringPtr; REF entries : StringArray; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyRadio (name : SysStringPtr; REF entries : StringArray; key : CHAR; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Slider-Object
** -------------
**
***************************************************************************)
PROCEDURE MakeSliderA (min, max, level : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeSlider (min, max, level : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeySliderA (min, max, level : LONGINT; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeySlider (min, max, level : LONGINT; key : CHAR; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeVSliderA (min, max, level : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeVSlider (min, max, level : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyVSliderA (min, max, level : LONGINT; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyVSlider (min, max, level : LONGINT; key : CHAR; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Scrollbar-Object
** -------------
**
***************************************************************************)
PROCEDURE MakeScrollbarA (first, visible, entries : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeScrollbar (first, visible, entries : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyScrollbarA (first, visible, entries : LONGINT; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyScrollbar (first, visible, entries : LONGINT; key : CHAR; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeVScrollbarA (first, visible, entries : LONGINT; tags : MuiTagAPtr) : Object;
PROCEDURE MakeVScrollbar (first, visible, entries : LONGINT; tags : LIST OF MuiTags) : Object;
PROCEDURE MakeKeyVScrollbarA (first, visible, entries : LONGINT; key : CHAR; tags : MuiTagAPtr) : Object;
PROCEDURE MakeKeyVScrollbar (first, visible, entries : LONGINT; key : CHAR; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Button to be used for popup objects
**
***************************************************************************)
PROCEDURE MakePopButtonA (img : StandardImages; tags : MuiTagAPtr) : Object;
PROCEDURE MakePopButton (img : StandardImages; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Popup-Object
** ------------
**
** An often needed GUI element is a string gadget with a little button
** that opens up a (small) window with a list containing possible entries
** for this gadget. Together with the Popup and the String macro,
** such a thing would look like
**
** VGroup;
** Child; PopupBegin;
** Child; STFont := String( "helvetica/13", 32 );
** PopupEnd( hook, m.iPopUp, STFont );
** ...;
**
** STFont will hold a pointer to the embedded string gadget and can
** be used to set and get its contents as with every other string object.
**
** For Hook description see below.
** The hook will be called with the string gadget as object whenever
** the user releases the popup button and could look like this:
**
** PROCEDURE FontReq( hook : Hook; obj : Object : args : Args) : LONGINT;
** VAR window : I.WindowPtr;
** l, t, w, h : LONGINT;
** req : ASL.AslRequesterPtr;
** BEGIN
** ...
**
** (* put our application to sleep while displaying the requester *)
** Set( Application, m.aApplicationSleep, TRUE );
**
** (* get the calling objects window and position *)
** Get( obj, m.aWindow , window );
** Get( obj, m.aLeftEdge, l );
** Get( obj, m.aTopEdge, t );
** Get( obj, m.aWidth , w );
** Get( obj, m.aHeight , h );
**
** req := m.AllocAslRequestTags( ASL.fontRequest, DONE )
** IF req # NIL THEN
**
** IF (m.AslRequestTags(req,
** ASL.foWindow ,window,
** ASL.foPrivateIDCMP ,TRUE,
** ASL.foTitleText ,"Select Font",
** ASL.foInitialLeftEdge,window->LeftEdge + l,
** ASL.foInitialTopEdge ,window->TopEdge + t+h,
** ASL.foInitialWidth ,w,
** ASL.foInitialHeight ,250,
** DONE ) ) THEN
**
** (* set the new contents for our string gadget *)
** Set( args(PopupArgs).linkedObj, m.aStringContents, req(ASL.FontRequester).attr.name);
** END;
** m.FreeAslRequest( req );
** END;
**
** (* wake up our application again *)
** Set(Application, m.aApplicationSleep, FALSE );
**
** RETURN( 0);
** END FontReq:
**
** Note: This Procedure is translated to Oberon on the fly, no warranty is given
** that this piece of code works.
**
***************************************************************************)
| Erqt rudimentär - nicht verwenden!
PROCEDURE MakePopupA (hook : Hook; img : StandardImages; obj : Object; tags : MuiTagAPtr) : Object;
PROCEDURE MakePopup (hook : Hook; img : StandardImages; obj : Object; tags : LIST OF MuiTags) : Object;
(***************************************************************************
**
** Labeling Objects
** ----------------
**
** Labeling objects, e.g. a group of string gadgets,
**
** Small: |foo |
** Normal: |bar |
** Big: |foobar|
** Huge: |barfoo|
**
** is done using a 2 column group:
**
** ColGroup(2);
** Child; Label2( "Small:" );
** Child; StringObject; end;
** Child; Label2( "Normal:" );
** Child; StringObject; end;
** Child; Label2( "Big:" );
** Child; StringObject; end;
** Child; Label2( "Huge:" );
** Child; StringObject; end;
** end;
**
** Note that we have three versions of the label procedure, depending on
** the frame type of the right hand object:
**
** Label1(): For use with standard frames (e.g. checkmarks).
** Label2(): For use with double high frames (e.g. string gadgets).
** Label() : For use with objects without a frame.
**
** These procedures ensure that your label will look fine even if the
** user of your application configured some strange spacing values.
** If you want to use your own labeling, you'll have to pay attention
** on this topic yourself.
**
**************************************************************************)
PROCEDURE MakeLabel (label : SysStringPtr) : Object;
PROCEDURE MakeLabel1 (label : SysStringPtr) : Object;
PROCEDURE MakeLabel2 (label : SysStringPtr) : Object;
PROCEDURE MakeLLabel (label : SysStringPtr) : Object;
PROCEDURE MakeLLabel1 (label : SysStringPtr) : Object;
PROCEDURE MakeLLabel2 (label : SysStringPtr) : Object;
PROCEDURE MakeKeyLabel (label : SysStringPtr; hichar : CHAR) : Object;
PROCEDURE MakeKeyLabel1 (label : SysStringPtr; hichar : CHAR) : Object;
PROCEDURE MakeKeyLabel2 (label : SysStringPtr; hichar : CHAR) : Object;
PROCEDURE MakeKeyLLabel (label : SysStringPtr; hichar : CHAR) : Object;
PROCEDURE MakeKeyLLabel1 (label : SysStringPtr; hichar : CHAR) : Object;
PROCEDURE MakeKeyLLabel2 (label : SysStringPtr; hichar : CHAR) : Object;
GROUP
HookGrp = HookEntry, MakeHook, SetHookObject;
StdObjectGrp =
StoreObject,
MakeFamilyObjectA, MakeFamilyObject,
MakeMenustripObjectA, MakeMenustripObject,
MakeMenuObjectA, MakeMenuObject,
MakeMenuObjectTA, MakeMenuObjectT,
MakeMenuitemObjectA, MakeMenuitemObject,
MakeWindowObjectA, MakeWindowObject,
MakeImageObjectA, MakeImageObject,
MakeBitmapObjectA, MakeBitmapObject,
MakeBodychunkObjectA, MakeBodychunkObject,
MakeNotifyObjectA, MakeNotifyObject,
MakeApplicationObjectA, MakeApplicationObject,
MakeTextObjectA, MakeTextObject,
MakeRectangleObjectA, MakeRectangleObject,
MakeListObjectA, MakeListObject,
MakePropObjectA, MakePropObject,
MakeStringObjectA, MakeStringObject,
MakeScrollbarObjectA, MakeScrollbarObject,
MakeListviewObjectA, MakeListviewObject,
MakeRadioObjectA, MakeRadioObject,
MakeVolumelistObjectA, MakeVolumelistObject,
MakeFloattextObjectA, MakeFloattextObject,
MakeDirlistObjectA, MakeDirlistObject,
MakeSliderObjectA, MakeSliderObject,
MakeCycleObjectA, MakeCycleObject,
MakeGaugeObjectA, MakeGaugeObject,
MakeScaleObjectA, MakeScaleObject,
MakeBoopsiObjectA, MakeBoopsiObject,
MakeColorfieldObjectA, MakeColorfieldObject,
MakeColorpanelObjectA, MakeColorpanelObject,
MakeColoradjustObjectA, MakeColoradjustObject,
MakePaletteObjectA, MakePaletteObject,
MakeGroupObjectA, MakeGroupObject,
MakeRegisterObjectA, MakeRegisterObject,
MakeVirtgroupObjectA, MakeVirtgroupObject,
MakeScrollgroupObjectA, MakeScrollgroupObject,
MakePopstringObjectA, MakePopstringObject,
MakePopobjectObjectA, MakePopobjectObject,
MakePoplistObjectA, MakePoplistObject,
MakePopaslObjectA, MakePopaslObject,
MakeScrmodelistObjectA, MakeScrmodelistObject;
GroupObjectGrp =
MakeVGroupA, MakeVGroup,
MakeHGroupA, MakeHGroup,
MakeColGroupA, MakeColGroup,
MakeRowGroupA, MakeRowGroup,
MakePageGroupA, MakePageGroup,
MakeVGroupAV, MakeVGroupV,
MakeHGroupAV, MakeHGroupV,
MakeColGroupAV, MakeColGroupV,
MakeRowGroupAV, MakeRowGroupV,
MakePageGroupAV, MakePageGroupV,
MakeRegisterGroupA, MakeRegisterGroup;
SimpleObjectGrp =
MakeHBar, MakeVBar, MakeHVSpace,
MakeHSpace, MakeVSpace,
MakeHCenterObject, MakeVCenterObject,
MakeStringA, MakeString, MakeKeyStringA, MakeKeyString,
MakeIntegerA, MakeInteger, MakeKeyIntegerA, MakeKeyInteger,
integerAccept, cardinalAccept,
MakeCheckMarkA, MakeCheckMark, MakeKeyCheckMarkA, MakeKeyCheckMark,
MakeSimpleButtonA, MakeSimpleButton, MakeKeyButtonA, MakeKeyButton,
MakeImageButtonA, MakeImageButton,
MakeCycleA, MakeCycle, MakeKeyCycleA, MakeKeyCycle,
MakeRadioA, MakeRadio, MakeKeyRadioA, MakeKeyRadio,
MakeSliderA, MakeSlider, MakeKeySliderA, MakeKeySlider,
MakeVSliderA, MakeVSlider, MakeKeyVSliderA, MakeKeyVSlider,
MakeScrollbarA, MakeScrollbar, MakeKeyScrollbarA, MakeKeyScrollbar,
MakeVScrollbarA, MakeVScrollbar, MakeKeyVScrollbarA, MakeKeyVScrollbar,
MakePopButtonA, MakePopButton, MakePopupA, MakePopup;
LabelObjectGrp =
MakeLabel, MakeLabel1, MakeLabel2,
MakeLLabel, MakeLLabel1, MakeLLabel2,
MakeKeyLabel, MakeKeyLabel1, MakeKeyLabel2,
MakeKeyLLabel, MakeKeyLLabel1, MakeKeyLLabel2;
All = StdObjectGrp, GroupObjectGrp, SimpleObjectGrp, LabelObjectGrp, FrameGrp,
StringArray;
END MuiOSimple.